<%@ Page Language="C#" Inherits="IBuyAdventure.PageBase" src="components/stdpage.cs" %>
<%@ Register TagPrefix="IBA" TagName="Header" Src="UserControl\Header.ascx" %>
<%@ Register TagPrefix="IBA" TagName="Categories" Src="UserControl\Categories.ascx" %>
<%@ Register TagPrefix="IBA" TagName="Special" Src="UserControl\Special.ascx" %>
<%@ Register TagPrefix="IBA" TagName="Footer" Src="UserControl\Footer.ascx" %>
<%@ OutputCache Duration="60" VaryByParam="*" %>

  <script language="C#" runat="server" >
      
	 private String GetCustomerID() {

	      if (Context.User.Identity.Name != "") {
		return Context.User.Identity.Name;
	      }
	      else {
	   if (Session["AnonUID"] == null)
		Session["AnonUID"] = Guid.NewGuid();
	   return Session["AnonUID"].ToString();
	      }
	    }

      void Page_Load(Object sender, EventArgs e) {
         
         if (Request.Params["Abandon"] == "1")
         {
	        IBuyAdventure.CartDB cart = new IBuyAdventure.CartDB(ConfigurationSettings.AppSettings["connectionString"]);  
	        cart.ResetShoppingCart(GetCustomerID());
         	Session.Abandon();
         	FormsAuthentication.SignOut();
         }

      }
   </script>

<HTML>
  <HEAD>
    <TITLE>IBuyAdventure Catalog</TITLE>
  </HEAD>
  
  <BODY BACKGROUND="images/back_sub.gif"> 
	  <form runat="server">
		<FONT FACE="Verdana, Arial, Helvetica" SIZE=2>
	    <TABLE BORDER=0 cellpadding=0 cellspacing=0>
        <tr>
          <td colspan=5>
            <IBA:Header id="Header" runat="server"/>
          </td>
        </tr>

        <TR>
          <TD colspan=3 ALIGN=LEFT VALIGN=TOP>
            <IBA:Categories id="Categories" runat="server"/>
          </TD>
          <td>
            &nbsp;&nbsp;
          </td>
          <TD align=left valign=top>
             <h3>Welcome to IBuyAdventure!</h3>
             <p>
             <FONT FACE="Verdana, Arial, Helvetica" SIZE=2>
             You know the drill: Proper equipment for your climb leads to a successful ascent. IBuyAdventure 
             gear has been tested in the most extreme environments on earth, from the 8,000-meter 
             peaks of the Himalayas to the sub-arctic giants of Alaska. 
             <p>
             <IBA:Special runat="server"/>
             <p>
             IBuyAdventure has all the gear you need for any excursion, from a day hike to a major 
             expedition. Shop with us, set up camp with us, and take our challenge. Join the IBuyAdventure 
             expedition! 
             <BR>
             <BR>
             <BR>
             <IBA:footer runat="server"/>
             </FONT>
          </TD>
        </TR>
        </TABLE>
    </FONT>
</form>
</BODY>
</HTML>
